using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace Acme.BookStore.Domain.Entities
{
    [Table("ShopWhereTable", Schema = "public")]
    public class ShopWhere : Entity
    {
        [Required]
        [Column("owner_code")]
        [StringLength(50)]
        public string OwnerCode { get; set; }

        [Required]
        [Column("product_code")]
        [StringLength(50)]
        public string ProductCode { get; set; }

        [Required]
        [Column("product_sku")]
        [StringLength(50)]
        public string ProductSku { get; set; }

        [Required]
        [Column("product_name")]
        [StringLength(100)]
        public string ProductName { get; set; }

        [Column("base_unit")]
        [StringLength(20)]
        public string BaseUnit { get; set; }
        
        public override object[] GetKeys()
        {
            return new object[] { OwnerCode, ProductCode, ProductSku };
        }
    }
} 